#!/usr/bin/sh -x
mkdir install
CUR_DIR=`pwd`
INSTALL=$CUR_DIR/install

echo "build zlib"
tar -xvf zlib-1.2.11.tar.xz
cd zlib-1.2.11
./configure --host=arm-linux --prefix=$INSTALL
make && make install
cd -

echo "build libjpeg"
tar -xvf jpegsrc.v9c.tar.gz
cd jpeg-9c/
./configure --host=arm-linux --prefix=$INSTALL
make && make install
cd -

echo "build libpng"
tar -xvf libpng-1.6.34.tar.xz
cd libpng-1.6.34/
./configure --host=arm-linux --prefix=$INSTALL 
make && make install
cd -


echo "build gsnap"
make
